package com.sysware.p2m;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

public class LockTable {

	public static final String ORACLE_JDBC_DRIVER = "oracle.jdbc.driver.OracleDriver";
	public static final String url = "jdbc:oracle:thin:@//192.168.5.200:1521/sysware";
	public static final String username = "P2M_DATACENTER_20190319";
	public static final String password = "P2M_DATACENTER_20190319";

	public static void main(String[] args) throws Exception {

		Class.forName(ORACLE_JDBC_DRIVER);
		Connection connection = DriverManager.getConnection(url, username, password);

		connection.setAutoCommit(false);
		//connection.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);

		Statement statement = connection.createStatement();

		statement.execute("INSERT INTO TEST_TABLE(ID, NAME) VALUES('1', 'LIXL')");
		statement.close();
		System.out.println(connection.getTransactionIsolation());//TRANSACTION_READ_COMMITTED
		connection.commit();
		connection.close();

	}

}
